package cn.zl.ymcc.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

/**
 * <p>
 * 课程目录
 * </p>
 *
 * @author zl
 * @since 2025-10-21
 */
@Getter
@Setter
@ToString
@Accessors(chain = true)
@TableName("t_course_type")
public class CourseType implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("create_time")
    private Long createTime;

    @TableField("update_time")
    private Long updateTime;

    /**
     * 类型名
     */
    @TableField("name")
    private String name;

    /**
     * 父ID
     */
    @TableField("pid")
    private Long pid;

    /**
     * 图标
     */
    @TableField("logo")
    private String logo;

    /**
     * 描述
     */
    @TableField("description")
    private String description;

    @TableField("sort_index")
    private Integer sortIndex;

    /**
     * 路径
     */
    @TableField("path")
    private String path;

    /**
     * 课程数量
     */
    @TableField("total_count")
    private Integer totalCount;
    @TableField(exist = false)
    private List<CourseType> children=new ArrayList<>();
}